package cn.yhbk.web.modules.manager.Service.Impl;

import cn.yhbk.web.modules.manager.Pojo.DTO.Comment.TbCommentDto;
import cn.yhbk.web.modules.manager.Pojo.Entity.TbComment;
import cn.yhbk.web.modules.manager.Mapper.TbCommentMapper;
import cn.yhbk.web.modules.manager.Service.ITbCommentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 评论表 服务实现类
 * </p>
 *
 * @author 有何不可
 * @since 2023-08-05
 */
@Service
public class TbCommentServiceImpl extends ServiceImpl<TbCommentMapper, TbComment> implements ITbCommentService {

    @Autowired
    private TbCommentMapper tbCommentMapper;

    @Override
    public TbCommentDto queryCommentById(Long id) {
        return tbCommentMapper.queryCommentById(id);
    }

    @Override
    public Boolean insertComment(TbComment tbComment) {
        return tbCommentMapper.insertComment(tbComment);
    }

    @Override
    public Boolean updateCommentById(TbComment tbComment) {
        return tbCommentMapper.updateCommentById(tbComment);
    }

    @Override
    public Boolean deleteCommentById(Long id) {
        return tbCommentMapper.deleteCommentById(id);
    }
}
